import request from "@/utils/request";

// 查询举报投诉列表
export function listComplaint(query) {
  return request({
    url: "/complaint/listPage",
    method: "get",
    params: query,
  });
}

// 查询举报投诉统计
export function getComplaintStat(query) {
  return request({
    url: "/complaint/manageStatistics",
    method: "get",
    params: query,
  });
}

// 导出举报投诉-列表
export function exportComplaint(data) {
  return request({
    url: "/complaint/exportComplaintExcel",
    method: "post",
    data: data,
  });
}

// 导出举报投诉-统计报表
export function exportComplaintStat(data) {
  return request({
    url: "/complaint/exportCmtStatisticsExcel",
    method: "post",
    data: data,
  });
}

// 更改举报投诉状态
export function updateComplaintStatus(data) {
  return request({
    url: "/complaint/updateEffectiveStatus",
    method: "put",
    data: data,
  });
}

// 删除举报投诉
export function delComplaint(Id) {
  return request({
    url: "/complaint/delete/" + Id,
    method: "delete",
  });
}

// 查询举报投诉统计-个人年度
export function userComplaintStat(query) {
  return request({
    url: "/police-statistics/complain",
    method: "get",
    params: query,
  });
}

// 查询举报投诉统计-个人排序图
export function userComplaintStatSort(query) {
  return request({
    url: "/police-statistics/complainCommunity",
    method: "get",
    params: query,
  });
}
